<?php if ($this->pageCount): ?>
<?php
    $frontController = Zend_Controller_Front::getInstance();

    $controllerName = $frontController->getRequest()->getControllerName();
    $moduleName = $frontController->getRequest()->getModuleName();
?>
    <div class="pagination2">
        <span class="countbox">&nbsp;<?php echo ($this->firstItemNumber); ?>-<?php echo ($this->lastItemNumber) ?> of <?php echo ($this->totalItemCount); ?>&nbsp;</span>
        <!-- Previous page link -->
    </div>
    <div class="pagination">
    <?php if (isset($this->previous)): ?>
        <a href="?page=1">&lt;&lt;</a> <!-- First Page -->
        <a href="?page=<?php echo $this->previous; ?>">&lt;</a> <!-- Previous page -->
    <?php
        endif;
        if (sizeof($this->pagesInRange) > 1) {
    ?>
            <!-- Numbered page links -->
    <?php foreach ($this->pagesInRange as $page): ?>
    <?php if ($page != $this->current): ?>
                    <a href="?page=<?php echo $page; ?>"><?php echo $page; ?></a>
    <?php else: ?>
                        <span class="current "><?php echo $page; ?></span>
    <?php endif; ?>
    <?php endforeach; ?>
    <?php } ?>
                    <!-- Next page link -->
    <?php if (isset($this->next)): ?>
                        <a href="?page=<?php echo $this->next; ?>">&gt;</a> <!-- Next page -->
                        <a href="?page=<?php echo $this->pageCount; ?>">&gt;&gt;</a> <!-- End Page -->
    <?php endif; ?>
                    </div>
<?php endif; ?>
